
package cake.entity;

import cake.dao.impl.CakeDaoImpl;

public class CakeImg {
	private int id;
	private int cid;
	private String img;
	public CakeImg() {}
	public CakeImg(int id, int cid, String img) {
		super();
		this.id = id;
		this.cid = cid;
		this.img = img;
	}

	public int getId() {
		return id;
	}


	public void setId(int id) {
		this.id = id;
	}


	public int getCid() {
		return cid;
	}


	public void setCid(int cid) {
		this.cid = cid;
	}


	public String getImg() {
		return img;
	}


	public void setImg(String img) {
		this.img = img;
	}
	
	public String getcakeNameByCid() {
		CakeDaoImpl cakeDaoImpl = new CakeDaoImpl();
		return cakeDaoImpl.getCakeById(this.cid).getName();
	}
}

